package o;

import java.io.IOException;
import java.util.Arrays;
import java.util.Map.Entry;
import org.jsoup.SerializationException;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Document.e;
import org.jsoup.nodes.Document.e.a;

public class gbh implements Entry<String, String>, Cloneable {
    private static final String[] ˊ = new String[]{"allowfullscreen", "async", "autofocus", "checked", "compact", "declare", "default", "defer", "disabled", "formnovalidate", "hidden", "inert", "ismap", "itemscope", "multiple", "muted", "nohref", "noresize", "noshade", "novalidate", "nowrap", "open", "readonly", "required", "reversed", "seamless", "selected", "sortable", "truespeed", "typemustmatch"};
    private String ˎ;
    gbi ˏ;
    private String ॱ;

    public /* synthetic */ Object clone() throws CloneNotSupportedException {
        return ˏ();
    }

    public /* synthetic */ Object getKey() {
        return ˊ();
    }

    public /* synthetic */ Object getValue() {
        return ˎ();
    }

    public /* synthetic */ Object setValue(Object obj) {
        return ˋ((String) obj);
    }

    public gbh(String str, String str2) {
        this(str, str2, null);
    }

    public gbh(String str, String str2, gbi o_gbi) {
        gbj.ˋ((Object) str);
        String trim = str.trim();
        gbj.ॱ(trim);
        this.ॱ = trim;
        this.ˎ = str2;
        this.ˏ = o_gbi;
    }

    public String ˊ() {
        return this.ॱ;
    }

    public String ˎ() {
        return gbi.ˋ(this.ˎ);
    }

    public String ˋ(String str) {
        String str2 = this.ˎ;
        if (this.ˏ != null) {
            str2 = this.ˏ.ˊ(this.ॱ);
            int ॱ = this.ˏ.ॱ(this.ॱ);
            if (ॱ != -1) {
                this.ˏ.ॱ[ॱ] = str;
            }
        }
        this.ˎ = str;
        return gbi.ˋ(str2);
    }

    public String ॱ() {
        StringBuilder ˏ = gbk.ˏ();
        try {
            ˋ(ˏ, new Document("").ॱॱ());
            return gbk.ˎ(ˏ);
        } catch (Throwable e) {
            throw new SerializationException(e);
        }
    }

    protected static void ˎ(String str, String str2, Appendable appendable, e eVar) throws IOException {
        appendable.append(str);
        if (!ॱ(str, str2, eVar)) {
            appendable.append("=\"");
            gbt.ˊ(appendable, gbi.ˋ(str2), eVar, true, false, false);
            appendable.append('\"');
        }
    }

    protected void ˋ(Appendable appendable, e eVar) throws IOException {
        ˎ(this.ॱ, this.ˎ, appendable, eVar);
    }

    public String toString() {
        return ॱ();
    }

    protected static boolean ॱ(String str, String str2, e eVar) {
        return eVar.ˎ() == a.html && (str2 == null || (("".equals(str2) || str2.equalsIgnoreCase(str)) && ॱ(str)));
    }

    protected static boolean ॱ(String str) {
        return Arrays.binarySearch(ˊ, str) >= 0;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        gbh o_gbh = (gbh) obj;
        if (this.ॱ == null ? o_gbh.ॱ != null : !this.ॱ.equals(o_gbh.ॱ)) {
            return false;
        }
        if (this.ˎ != null) {
            return this.ˎ.equals(o_gbh.ˎ);
        }
        if (o_gbh.ˎ != null) {
            return false;
        }
        return true;
    }

    public int hashCode() {
        int hashCode;
        int i = 0;
        if (this.ॱ != null) {
            hashCode = this.ॱ.hashCode();
        } else {
            hashCode = 0;
        }
        hashCode *= 31;
        if (this.ˎ != null) {
            i = this.ˎ.hashCode();
        }
        return hashCode + i;
    }

    public gbh ˏ() {
        try {
            return (gbh) super.clone();
        } catch (Throwable e) {
            throw new RuntimeException(e);
        }
    }
}
